/*
wellbye：这个文件是自动生成的，不要手工修改！ 
*/
using System;
using ILRuntime.CLR.Method;
using ILRuntime.Other;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;

[ILRAdaptor]
public class ILRAdaptor_AVPlayerViewControllerDelegate : CrossBindingAdaptor
{
    public override Type BaseCLRType { get { return typeof(AVKit.AVPlayerViewControllerDelegate); } }
    public override Type AdaptorType { get { return typeof(Adaptor); } }

    public override object CreateCLRInstance(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
    {
        return new Adaptor(appDomain, instance); //创建一个新的实例
    }

    //实际的适配器类需要继承你想继承的那个类，并且实现CrossBindingAdaptorType接口
    public class Adaptor : AVKit.AVPlayerViewControllerDelegate, CrossBindingAdaptorType
    {
        ILTypeInstance instance;
        ILRuntime.Runtime.Enviorment.AppDomain appDomain;

        public Adaptor() { }

        public Adaptor(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
        {
            this.appDomain = appDomain;
            this.instance = instance;
        }

        public ILTypeInstance ILInstance { get { return instance; } }

        
        
        IMethod methodDidStartPictureInPicture0;
        bool isCallingDidStartPictureInPicture0= false;
        
            public override void DidStartPictureInPicture(AVKit.AVPlayerViewController p0) 
            { 
                if (methodDidStartPictureInPicture0 == null && instance!=null )
                {
                    methodDidStartPictureInPicture0 = instance.Type.GetMethod("DidStartPictureInPicture", 1);
                }
                if (methodDidStartPictureInPicture0 != null && !isCallingDidStartPictureInPicture0)
                {
                    isCallingDidStartPictureInPicture0 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodDidStartPictureInPicture0, instance, param );
                        
                        
                        isCallingDidStartPictureInPicture0 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In DidStartPictureInPicture *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.DidStartPictureInPicture(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodDidStopPictureInPicture1;
        bool isCallingDidStopPictureInPicture1= false;
        
            public override void DidStopPictureInPicture(AVKit.AVPlayerViewController p0) 
            { 
                if (methodDidStopPictureInPicture1 == null && instance!=null )
                {
                    methodDidStopPictureInPicture1 = instance.Type.GetMethod("DidStopPictureInPicture", 1);
                }
                if (methodDidStopPictureInPicture1 != null && !isCallingDidStopPictureInPicture1)
                {
                    isCallingDidStopPictureInPicture1 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodDidStopPictureInPicture1, instance, param );
                        
                        
                        isCallingDidStopPictureInPicture1 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In DidStopPictureInPicture *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.DidStopPictureInPicture(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodShouldAutomaticallyDismissAtPictureInPictureStart2;
        bool isCallingShouldAutomaticallyDismissAtPictureInPictureStart2= false;
        
            public override System.Boolean ShouldAutomaticallyDismissAtPictureInPictureStart(AVKit.AVPlayerViewController p0) 
            { 
                if (methodShouldAutomaticallyDismissAtPictureInPictureStart2 == null && instance!=null )
                {
                    methodShouldAutomaticallyDismissAtPictureInPictureStart2 = instance.Type.GetMethod("ShouldAutomaticallyDismissAtPictureInPictureStart", 1);
                }
                if (methodShouldAutomaticallyDismissAtPictureInPictureStart2 != null && !isCallingShouldAutomaticallyDismissAtPictureInPictureStart2)
                {
                    isCallingShouldAutomaticallyDismissAtPictureInPictureStart2 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodShouldAutomaticallyDismissAtPictureInPictureStart2, instance, param );
                        
                        
                        isCallingShouldAutomaticallyDismissAtPictureInPictureStart2 = false;

                        
                        return (System.Boolean)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ShouldAutomaticallyDismissAtPictureInPictureStart *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return base.ShouldAutomaticallyDismissAtPictureInPictureStart(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodWillStartPictureInPicture3;
        bool isCallingWillStartPictureInPicture3= false;
        
            public override void WillStartPictureInPicture(AVKit.AVPlayerViewController p0) 
            { 
                if (methodWillStartPictureInPicture3 == null && instance!=null )
                {
                    methodWillStartPictureInPicture3 = instance.Type.GetMethod("WillStartPictureInPicture", 1);
                }
                if (methodWillStartPictureInPicture3 != null && !isCallingWillStartPictureInPicture3)
                {
                    isCallingWillStartPictureInPicture3 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodWillStartPictureInPicture3, instance, param );
                        
                        
                        isCallingWillStartPictureInPicture3 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In WillStartPictureInPicture *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.WillStartPictureInPicture(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodWillStopPictureInPicture4;
        bool isCallingWillStopPictureInPicture4= false;
        
            public override void WillStopPictureInPicture(AVKit.AVPlayerViewController p0) 
            { 
                if (methodWillStopPictureInPicture4 == null && instance!=null )
                {
                    methodWillStopPictureInPicture4 = instance.Type.GetMethod("WillStopPictureInPicture", 1);
                }
                if (methodWillStopPictureInPicture4 != null && !isCallingWillStopPictureInPicture4)
                {
                    isCallingWillStopPictureInPicture4 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodWillStopPictureInPicture4, instance, param );
                        
                        
                        isCallingWillStopPictureInPicture4 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In WillStopPictureInPicture *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.WillStopPictureInPicture(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodDidChange5;
        bool isCallingDidChange5= false;
        
            public override void DidChange(Foundation.NSKeyValueChange p0, Foundation.NSIndexSet p1, Foundation.NSString p2) 
            { 
                if (methodDidChange5 == null && instance!=null )
                {
                    methodDidChange5 = instance.Type.GetMethod("DidChange", 3);
                }
                if (methodDidChange5 != null && !isCallingDidChange5)
                {
                    isCallingDidChange5 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodDidChange5, instance, param );
                        
                        
                        isCallingDidChange5 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In DidChange *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.DidChange(p0, p1, p2);
                        
                    

                }
            }
        
        
        
        IMethod methodDidChange6;
        bool isCallingDidChange6= false;
        
            public override void DidChange(Foundation.NSString p0, Foundation.NSKeyValueSetMutationKind p1, Foundation.NSSet p2) 
            { 
                if (methodDidChange6 == null && instance!=null )
                {
                    methodDidChange6 = instance.Type.GetMethod("DidChange", 3);
                }
                if (methodDidChange6 != null && !isCallingDidChange6)
                {
                    isCallingDidChange6 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodDidChange6, instance, param );
                        
                        
                        isCallingDidChange6 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In DidChange *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.DidChange(p0, p1, p2);
                        
                    

                }
            }
        
        
        
        IMethod methodDidChangeValue7;
        bool isCallingDidChangeValue7= false;
        
            public override void DidChangeValue(System.String p0) 
            { 
                if (methodDidChangeValue7 == null && instance!=null )
                {
                    methodDidChangeValue7 = instance.Type.GetMethod("DidChangeValue", 1);
                }
                if (methodDidChangeValue7 != null && !isCallingDidChangeValue7)
                {
                    isCallingDidChangeValue7 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodDidChangeValue7, instance, param );
                        
                        
                        isCallingDidChangeValue7 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In DidChangeValue *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.DidChangeValue(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodWillChange8;
        bool isCallingWillChange8= false;
        
            public override void WillChange(Foundation.NSKeyValueChange p0, Foundation.NSIndexSet p1, Foundation.NSString p2) 
            { 
                if (methodWillChange8 == null && instance!=null )
                {
                    methodWillChange8 = instance.Type.GetMethod("WillChange", 3);
                }
                if (methodWillChange8 != null && !isCallingWillChange8)
                {
                    isCallingWillChange8 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodWillChange8, instance, param );
                        
                        
                        isCallingWillChange8 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In WillChange *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.WillChange(p0, p1, p2);
                        
                    

                }
            }
        
        
        
        IMethod methodWillChange9;
        bool isCallingWillChange9= false;
        
            public override void WillChange(Foundation.NSString p0, Foundation.NSKeyValueSetMutationKind p1, Foundation.NSSet p2) 
            { 
                if (methodWillChange9 == null && instance!=null )
                {
                    methodWillChange9 = instance.Type.GetMethod("WillChange", 3);
                }
                if (methodWillChange9 != null && !isCallingWillChange9)
                {
                    isCallingWillChange9 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodWillChange9, instance, param );
                        
                        
                        isCallingWillChange9 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In WillChange *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.WillChange(p0, p1, p2);
                        
                    

                }
            }
        
        
        
        IMethod methodWillChangeValue10;
        bool isCallingWillChangeValue10= false;
        
            public override void WillChangeValue(System.String p0) 
            { 
                if (methodWillChangeValue10 == null && instance!=null )
                {
                    methodWillChangeValue10 = instance.Type.GetMethod("WillChangeValue", 1);
                }
                if (methodWillChangeValue10 != null && !isCallingWillChangeValue10)
                {
                    isCallingWillChangeValue10 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodWillChangeValue10, instance, param );
                        
                        
                        isCallingWillChangeValue10 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In WillChangeValue *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.WillChangeValue(p0);
                        
                    

                }
            }
        
        
    }
}